#!/usr/bin/env python
#-*- coding:utf8 -*-
import web
import hashlib
from app.models.model import Model
class SiteNode(Model):
    table = 'sites_node'

    #创建网站节点关系
    def create(self, sid,nid):
        if self.get_by("sid='%s' and nid='%s'" % (sid, nid)):
            return True
        try:
            return self.insert(sid = sid, nid = nid)
        except:
            return False
